﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace EmployeesNorthWind
{
    public partial class Details : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id;
            if (int.TryParse(Request.Params["EmployeeID"], out id))
            {

                if (!IsPostBack)
                {
                    var details = from dt in DBNorthWind.context.Employees
                                  where dt.EmployeeID == id
                                  select dt;
                    this.detailsView.DataSource = details;
                    DataBind();
                }
            }
        }
    }
}